<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $model */
/* @var $menus */

?>

<div class="admin-group-form">
    <?php $form = ActiveForm::begin([
        'id' => 'AdminGroup',
        'options' => ['class' => 'form-horizontal'],
        'fieldConfig' => [
            'template' => "{label}\n<div class=\"col-md-9\">{input}\n{error}</div>",
            'labelOptions' => ['class' => 'col-md-3 control-label']
        ]
    ]); ?>

    <?= $form->field($model, 'gname')->textInput(['maxlength' => true]); ?>

    <?= $form->field($model, 'privilege_ids', ['class' => 'admin\components\TreeActiveField', 'enableClientValidation' => FALSE])->checkboxList($menus); ?>

    <div class="form-group hidden">
        <?= Html::submitButton('保存', ['class' => 'btn btn-full']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
